#include <cusp/csr_matrix.h>
#include <cusp/print.h>

#include <cusp/gallery/poisson.h>
#include <cusp/graph/partition.h>
#include <cusp/io/matrix_market.h>

int main(int argc, char * argv[])
{
    typedef idx_t IndexType;
    typedef float ValueType;
    typedef cusp::host_memory MemorySpace;

    cusp::csr_matrix<IndexType, ValueType, MemorySpace> graph;
    
    // create a matrix for a diffusion problem on a 4x4 grid
    cusp::io::read_matrix_market_file(graph, argv[2]);

    IndexType num_parts = atoi(argv[1]);
    cusp::array1d<IndexType,MemorySpace> partition;
    cusp::graph::partition(graph, num_parts, partition);

    return 0;
}

